<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>oddres.jsp</title>
</head>
<body>

<%-- <% 
     int x = Integer.parseInt(request.getParameter("x"));
     int y = Integer.parseInt(request.getParameter("y"));
     
     String str="";
     
     if(x>y){
          for(int i=y; i<=x; i++){
               if(i%2==1){
                    str += ""+i+"  ";
               }
          }
     }
     else{
          for(int i=x; i<=y; i++){
               if(i%2==1){
                    str += ""+i+"  ";
               }
          }
     }
%>
<fieldset class="f" >
     <legend><%=x %> 에서 <%=y %> 까지의 홀수</legend>
     <br><%=str %>
</fieldset> --%>

<fieldset class="f" >
     <legend><%=request.getParameter("x") %> 에서 <%=request.getParameter("y") %> 까지의 홀수</legend>


<% 
     int x = Integer.parseInt(request.getParameter("x"));
     int y = Integer.parseInt(request.getParameter("y"));
     
     if(x>y){
          for(int i=y; i<=x; i++){
               if(i%2==1){
%>
     <%=i %>&nbsp;&nbsp;&nbsp;&nbsp;
<%
               }
          }
     }
     else{
          for(int i=x; i<=y; i++){
               if(i%2==1){

%>
     <%=i %>&nbsp;&nbsp;&nbsp;&nbsp;
<% 
               }
          }
     }
     
%>
</fieldset>
<br>
<input type="button" value="재입력" onclick="location.href='main.jsp?inc=./jsp/odd.jsp'">
</body>
</html>